import com.adobe.cairngorm.control.CairngormEventDispatcher;

import net.optix.ip.events.DeleteClientEvent;
import net.optix.ip.events.UpdateClientEvent;
import net.optix.ip.model.ModelLocator;
import net.optix.ip.vo.ClientVO;
[Bindable]
private var model:ModelLocator	=	ModelLocator.getInstance();

[Bindable]
private var client:ClientVO;

private function selectClient():void
{
	client	=	ClientVO(clients.selectedItem);
}

public function deleteClient():void
{
	var event:DeleteClientEvent	=	new DeleteClientEvent(client.clientID);
	CairngormEventDispatcher.getInstance().dispatchEvent(event);
}

public function updateClient():void
{
	model.currentClient	=	client;
	var event:UpdateClientEvent	=	new UpdateClientEvent(client);
	com.adobe.cairngorm.control.CairngormEventDispatcher.getInstance().dispatchEvent(event);
}